package com.ssm.service;

import com.ssm.Entity.File;
import com.ssm.Entity.Folder;
import com.ssm.dao.FileDAOImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FileService {

    @Autowired
    private FileDAOImpl fileDAO;


    public List<File> findFileByFolderId(File file) {
        return fileDAO.findFileByFolderId(file);
    }

    public int createFile(File fille) {
        return fileDAO.createFile(fille);
    }

    public int updateFolderSize(Folder folder) {
        return fileDAO.updateFolderSize(folder);
    }

    public Integer selectFileTimesByFileName(String fileName) {
        return fileDAO.selectFileTimesByFileName(fileName);
    }

    public int updateFileTimesByFileName(String fileName, int times) {
        return fileDAO.updateFileTimesByFileName(fileName, times);
    }
}
